﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RC_CatalogDtls.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.RC_CatalogDtls" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title></title>
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../Scripts/DatePicker.js"></script>
</head>
<body>
    <form id="form1" runat="server">   

   <script type="text/javascript">

       function openReport() {
           radopen("RPT_Exports.aspx?ReportName=RPT_CMD_Headers", "ProjectDtls");
       }
       function onTextChange(sender) {
           if (sender.get_value() == "") {
               sender.set_text("");
           }
       }
       function isNumberKey(event)  // ตัวเลขอย่างเดียว
       {
           var charCode = (event.which) ? event.which : event.keyCode
           if (charCode > 31 && (charCode < 48 || charCode > 57)) {
               alert("กรุณากรอกข้อมูลเป็นตัวเลข!")
               return false;
           }
           return true;
       }
   </script>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel2" />
                    <telerik:AjaxUpdatedControl ControlID="CrystalReportViewer1" LoadingPanelID="RadAjaxLoadingPanel2" /> 
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
    </telerik:RadAjaxLoadingPanel>    
    
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
<Windows>
    <telerik:RadWindow 
        id="ProjectDtls" 
        runat="server"
        showcontentduringload="false"
        VisibleStatusbar="false"
        title="บัญชีรายชื่อ"
        width="1000px"
        Height="520px"        
        Modal="true"
        Skin = "Vista"
        behaviors="Close">
    </telerik:RadWindow>
</Windows>

</telerik:RadWindowManager>
    
    <title></title>
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" /> 
    

    <div class="moduleDivSlim1000x450">
    <div class="moduleDivBottom1000">

        <table align="center" width ="820px" >
        <tr>
            <td align="left" class="tableHeader">
                บัญชีรายชื่อ</td>
        </tr>

        <tr>
        <td >
        <asp:Panel ID="PanelGrid" runat="server" width ="950px" Height="400px" ScrollBars="Auto" >
            <telerik:RadGrid ID="RadGrid2" runat="server" 
                AllowFilteringByColumn="True" 
                AllowAutomaticDeletes="True"
                AllowMultiRowEdit="True" 
                AllowMultiRowSelection="True" AllowPaging="True" 
                AllowSorting="True" 
                AutoGenerateColumns="False" EnableAJAX="True" 
                EnableAJAXLoadingTemplate="True" GridLines="None" 
                OnItemCommand="RadGrid2_ItemCommand" 
                Skin="Outlook" width ="900px"
                GroupingSettings-GroupByFieldsSeparator = "&nbsp;&nbsp;&nbsp;&nbsp;"
                GroupingSettings-GroupContinuedFormatString = ""
                GroupingSettings-GroupContinuesFormatString = ""
                GroupingSettings-GroupSplitFormat = "">
                <MasterTableView 
                    AllowMultiColumnSorting="True" 
                    CellSpacing="-1" 
                    ClientDataKeyNames="cat_dtls_seq" 
                    CommandItemDisplay="Top" 
                    DataKeyNames="cat_dtls_seq" 
                    InsertItemPageIndexAction="ShowItemOnCurrentPage" 
                    NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                    <CommandItemTemplate>
                        <table width="100%">
                            <tr>
                                <td>
                                    <asp:LinkButton ID="cmdAddNew" runat="server" CausesValidation="False" 
                                        CommandName="InitInsert" 
                                        Visible="<%# !RadGrid2.MasterTableView.IsItemInserted && RadGrid2.EditIndexes.Count <= 0 %>"> <img alt="" src="../Images/Buttons/AddRecord.gif" 
                                        style="border: 0px; vertical-align: middle;" />เพิ่มรายชื่อ</asp:LinkButton>
                                    &nbsp;&nbsp;
                                </td>
                                <td align="right">
                                </td>
                            </tr>
                        </table>
                    </CommandItemTemplate>
                    <RowIndicatorColumn>
                        <HeaderStyle Width="15px" />
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="15px" />
                    </ExpandCollapseColumn>                                
                    <Columns>

                    <telerik:GridEditCommandColumn 
                            EditText = "คลิกเพื่อแก้ไขรายการ"
                            ButtonType="ImageButton">
                            <HeaderStyle HorizontalAlign="Center" Width="15px" />
                            <ItemStyle HorizontalAlign="Center" Width="15px" />
                        </telerik:GridEditCommandColumn>
                        <telerik:GridButtonColumn 
                            ButtonType="ImageButton" 
                            CommandName="Delete" 
                            ConfirmDialogType="RadWindow" 
                            ConfirmText="ลบข้อมูลที่เลือก?" 
                            ItemStyle-Width="15" 
                            Text="คลิกเพื่อลบรายการ" 
                            UniqueName="column1">
                            <HeaderStyle HorizontalAlign="Center" Width="15px" />
                            <ItemStyle HorizontalAlign="Center" Width="15px"/>
                        </telerik:GridButtonColumn>
                        <telerik:GridBoundColumn 
                            AutoPostBackOnFilter="true" 
                            ShowFilterIcon="false" 
                            CurrentFilterFunction="Contains" 
                            DataField="cat_no" 
                            FilterControlWidth="100%" 
                            HeaderStyle-HorizontalAlign="Center" 
                            HeaderText="ลำดับที่่" 
                            ItemStyle-HorizontalAlign = "Center"
                            UniqueName = "cat_no">
                            <HeaderStyle HorizontalAlign="Center" Width="50px" />                     
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn 
                            AutoPostBackOnFilter="true" 
                            ShowFilterIcon="false" 
                            CurrentFilterFunction="Contains" 
                            DataField="tmp_emp_text" 
                            FilterControlWidth="100%" 
                            HeaderStyle-HorizontalAlign="Center" 
                            HeaderText="ชื่อ - นามสกุล"
                            UniqueName = "tmp_emp_text">
                            <HeaderStyle HorizontalAlign="Center" Width="150" />               
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn 
                            AutoPostBackOnFilter="true" 
                            ShowFilterIcon="false" 
                            CurrentFilterFunction="Contains" 
                            DataField="field_pos_name" 
                            FilterControlWidth="100%" 
                            HeaderStyle-HorizontalAlign="Center" 
                            HeaderText="ตำแหน่ง"
                            UniqueName = "field_pos_name">
                            <HeaderStyle HorizontalAlign="Center" Width="150" />               
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn 
                            AutoPostBackOnFilter="true" 
                            ShowFilterIcon="false" 
                            CurrentFilterFunction="Contains" 
                            DataField="cat_status_name" 
                            FilterControlWidth="100%" 
                            HeaderStyle-HorizontalAlign="Center" 
                            HeaderText="สถานะ" 
                            UniqueName = "cat_status_name">
                            <HeaderStyle HorizontalAlign="Center" Width="50" />               
                        </telerik:GridBoundColumn>                       
                         <telerik:GridBoundColumn 
                            AutoPostBackOnFilter="true" 
                            ShowFilterIcon="false" 
                            CurrentFilterFunction="Contains" 
                            DataField="remarks" 
                            FilterControlWidth="100%" 
                            HeaderStyle-HorizontalAlign="Center" 
                            HeaderText="หมายเหตุ" 
                            UniqueName = "remarks">
                            <HeaderStyle HorizontalAlign="Center" Width="100" />               
                        </telerik:GridBoundColumn> 
            </Columns>                         
            <EditFormSettings EditFormType="WebUserControl"  UserControlName="../UserControls/RC_CatalogDtls.ascx">
                <EditColumn UniqueName="EditCommandColumn1">
                </EditColumn>
            </EditFormSettings>
            <PagerStyle Mode="NextPrevNumericAndAdvanced" />
            </MasterTableView>
            <ClientSettings AllowColumnHide="True" AllowColumnsReorder="True" 
                EnableRowHoverStyle="True" ReorderColumnsOnClient="True">
                <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
            </ClientSettings>
        </telerik:RadGrid>
    </asp:Panel>
</td>
</tr>
</table>
</div>
</div>

</form>
</body>
</html>
